#ifndef CSPHERE_H
#define CSPHERE_H

#include "cpoint3f.h"
#include "cvecteur3f.h"
#include <QtOpenGL>
#include "cdrawable.h"
#include "craytracable.h"
#include <QDebug>

class CSphere : public CDrawable, public CRayTracable
{
public:
	CSphere(CPoint3f position, float r, CMaterial mat);

	void paint();

	bool intersect(CRay * Ray, CPoint3f& P, CVecteur3f& V); // return true if at least one intersection point actually exists and then set the point to the first of these points and the vector to the normal at this point, return false otherwise


	CPoint3f position;
	float Rayon;
};

#endif // CSPHERE_H
